<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" import="java.util.*,vo.Good"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>宠物商店</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="Resources/css/shopShow.css">
<link rel="stylesheet" type="text/css" href="Resources/layui/css/layui.css">
<script type="text/javascript" src="Resources/layui/layui.js"></script>

</head>
<body>

	<!--所有商品展示区-->
	
	<div class="content">
		<div style="background:#f8f8f8;height:50px"></div>
		<div style="margin-left: 20%;font-size: 20px;width: 60%" >
			<a href="jump?status=index">返回</a>
			<hr style="color: #000000">
			<br>
		</div>		
		<table width="80%" border="0"  class="show" style="margin:auto;">
			<tr>
				<c:forEach items="${products}" var="Good" varStatus="st">
					<td align="center" valign="middle">
						<a href="listProduct?status=select&gid=${Good.gid }"><img src="${Good.gsrc }" width="250px" height="200px"></a><br/>
						名字：${Good.gName }<br/>
						种类：${Good.cateName}<br/>
						信息：${Good.gMsg }<br/>
						价格：￥${Good.gPrice }<br/>
					</td>
				</c:forEach>
			</tr>
		</table>
		<table align="center">
				<tr >
				<td colspan="3" align="center">
					<a href="listProduct?status=selectall&start=0"><input type="button" name="" id="" value="首页" /></a>&emsp;
					<a href="listProduct?status=selectall&status=selectpage&start=${prePage}"><input type="button" name="" id="" value="前一页" /></a>&emsp;
					<a href="listProduct?status=selectall&status=selectpage&start=${nextPage}"><input type="button" name="" id="" value="后一页" /></a>&emsp;
					<a href="listProduct?status=selectall&status=selectpage&start=${totalPage-1}"><input type="button" name="" id="" value="尾页" /></a>&emsp;
				</td>
			</tr>
			<tr>
				<td colspan="3" valign="middle" align="center">当前记录数:${star}&emsp;总记页数：${totalPage}&emsp;总记录数：${totalsize}</td>
			</tr>
		</table>
		
	</div>

<script type="text/javascript">
layui.use(['carousel', 'form'], function(){
  var carousel = layui.carousel
  ,form = layui.form;
  
  //图片轮播
  carousel.render({
    elem: '#test10'
    ,width: 'auto'
    ,height: '550px'
    ,interval: 5000
  });
  
  var $ = layui.$, active = {
    set: function(othis){
      var THIS = 'layui-bg-normal'
      ,key = othis.data('key')
      ,options = {};
      
      othis.css('background-color', '#5FB878').siblings().removeAttr('style'); 
      options[key] = othis.data('value');
      ins3.reload(options);
    }
  };
  
  //监听开关
  form.on('switch(autoplay)', function(){
    ins3.reload({
      autoplay: this.checked
    });
  });
  
  $('.demoSet').on('keyup', function(){
    var value = this.value
    ,options = {};
    if(!/^\d+$/.test(value)) return;
    
    options[this.name] = value;
    ins3.reload(options);
  });
  
  //其它示例
  $('.demoTest .layui-btn').on('click', function(){
    var othis = $(this), type = othis.data('type');
    active[type] ? active[type].call(this, othis) : '';
  });
});

</script>

</body>
</html>